package com.yurun.teacherorgmodule.mapper;

import com.yurun.commonapi.pojo.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface TeacherMapper {
    List<Teacher> getAllTeacherInfoByOrgId(BigInteger organizationId);

    List<Teacher> getTeacherByOrgIdAndTeamId(@Param("organizationId")BigInteger organizationId, @Param("teamId")int teamId);

    List<Teacher> getTeacherByBranchIdAndName(@Param("organizationId") BigInteger organizationId, @Param("branchId") BigInteger branchId, @Param("keyword") String keyword);

    List<Teacher> getTeacherByOrgIdAndName(@Param("organizationId")BigInteger organizationId, @Param("keyword") String keyword);

    List<Teacher> getTeacherByTeamIdAndName(@Param("organizationId")BigInteger organizationId, @Param("keyword") String keyword, @Param("teamId")int teamId);

    int editTeacher(Teacher teacher);

    List<Teacher> getAllBranchTeacherInfoByBranchId(@Param("organizationId") BigInteger organizationId, @Param("branchId") BigInteger branchId);

    List<Teacher> getTeacherByBranchIdAndTeamId(@Param("organizationId") BigInteger organizationId, @Param("branchId") BigInteger branchId, @Param("teamId")int teamId);

    int delTeacherById(BigInteger employeeId, BigInteger organizationId, BigInteger branchId, Date updateTime);

    int addTeacher(Teacher teacher);

    int delTeacherFor(BigInteger employeeId);

    List<Integer> getRoleList(BigInteger employeeId);


    List<Integer> getAdminAllPermission(int categoryId);

}
